package com.song.estore.domain;

import java.io.Serializable;

/**
 * Created by 范姣姣 on 2015/10/22.
 */
public class OrderitemPK implements Serializable {
    private String orderId;
    private int productId;

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        OrderitemPK that = (OrderitemPK) o;

        if (productId != that.productId) return false;
        if (orderId != null ? !orderId.equals(that.orderId) : that.orderId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = orderId != null ? orderId.hashCode() : 0;
        result = 31 * result + productId;
        return result;
    }
}
